/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.srcptit.javatrainning.thupt.b1;

import java.util.Scanner;

/**
 *
 * @author Autumn
 */
public class bai5 {
    public static int n;
    public static int f[];
    public static void main(String args[]){
        Scanner sc=new Scanner(System.in);
        n=sc.nextInt();
        f=new int[n+1];
        System.out.println(fibonaci(n));
                                          }
    public static int fibonaci(int x){
        f[0]=0;f[1]=1;
        if(x<2)return f[x];
        return fibonaci(x-1)+fibonaci(x-2);
                 }                                      
}